﻿<html>
    <head>
        <title>Kho | QL Nhập</title>
        <link rel="stylesheet" type="text/css" href="<?php echo base_url("web/css/qlnhap.css");?>"/>
        <link rel="stylesheet" type="text/css" href="<?php echo base_url("web/css/sach.css");?>"/>
        <link rel="stylesheet" type="text/css" href="<?php echo base_url("web/css/thoitrang.css");?>"/>
        <script language="javascript" src="js/jquery.js"></script>
        <script language="javascript" src="http://ajax.Googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
        <script language="javascript" src="<?php echo base_url("web/js/sach.js");?>"></script>
    </head>
<body>
    <div id="header">
        <h1 align="center">DEV - VITBAY.VN</h1>
    </div>
    <div id="menu">
        <a href="<?php echo site_url("home");?>">Home</a>|
        <a href="qlnhap.php">Kho</a>|
        <a href="">Thêm mới sản phẩm</a>|
        <a href="">Danh sách nhà cung cấp</a>|
        <a href="baocao.php">Báo cáo <img src='<?php echo base_url("img/new.gif");?>' height='15px' width='40px'/></a>
    </div>
    <div align="right" style="margin-right: 40px;">
        <a href=""><img src="<?php echo base_url("web/photos/add.png");?>" width="50px" height="50px"/></a>
    </div>
    <div id="add_any">
        <h2>Thêm sản phẩm mới !</h2>
        <form name="form" action="" method="post">
            <table width="100%" height="200px">
                <tr>
                    <td>
                        <label>Tên sản phẩm</label>
                        <input type="text" name="name_p"/>
                        <?php if(isset($this->error->tensach)) echo $this->error->tensach;?>
                    </td>
                    <td>
                        <label>Số lượng</label>
                        <input type="text" name="sluong_p"/>
                        <?php if(isset($this->error->soluong)) echo $this->error->soluong;?>
                    </td>
                    <td>
                        <label>Giá bìa</label>
                        <input type="text" name="giabia_p"/>
                    </td>
                    <td>
                        <label>Giá bán</label>
                        <input type="text" name="giaban_p"/>
                    </td>
                </tr>

                <tr>
                    <td>
                        <label>Tác giả</label>
                        <input type="text" name="tacgia_p"/>
                    </td>
                    <td>
                        <label>Nhà xuất bản</label>
                        <input type="text" name="nxb_p"/>
                    </td>
                    <td>
                        <label>Loại sách</label>
                        <input type="text" name="theloai_p"/>
                    </td>
                    <td>
                        <label>Năm xuất bản</label>
                        <select name="year_xb">
                            <option selected>---Chọn năm---</option>
                            <script language="javascript">
                                for(var i=1900; i<=2012; i++)
                                {
                                    document.write("<option value='"+i+"'>"+i+"</option>");
                                }
                            </script>
                        </select>
                    </td>
                </tr>
                <tr>
                    <td>
                        <label>Ngày nhập</label>
                        <select name="day">
                            <option selected>---Ngày---</option>
                            <script language="javascript">
                                for(var i=1; i<=31; i++)
                                {
                                    if(i<10)
                                    {
                                        document.write("<option value='"+i+"'>0"+i+"</option>");
                                    }
                                    else
                                    {
                                        document.write("<option value='"+i+"'>"+i+"</option>");
                                    }
                                }
                            </script>
                        </select>
                        <select name="month">
                            <option selected>---Tháng---</option>
                            <script language="javascript">
                                for(var i=1; i<=12; i++)
                                {
                                    if(i<10)
                                    {
                                        document.write("<option value='"+i+"'>0"+i+"</option>");
                                    }
                                    else
                                    {
                                        document.write("<option value='"+i+"'>"+i+"</option>");
                                    }
                                }
                            </script>
                        </select>
                        <select name="year">
                            <option selected>---Năm---</option>
                            <script language="javascript">
                                for(var i=1900; i<=2012; i++)
                                {
                                    document.write("<option value='"+i+"'>"+i+"</option>");
                                }
                            </script>
                        </select>
                    </td>
                </tr>
            </table>

            <div>
                <p>Mô tả chi tiết sản phẩm</p>
                <p>
                    <textarea name="mota_p" cols="120" rows="20">
                    <?php
                    if(isset($_POST['sub']))
                    {
                        echo $_POST['year_xb'];
                    }
                    ?>
                    </textarea>
                </p>
            </div>
            <div>
                <button type="submit" name="sub">Thêm</button>
                <button type="reset" name="ret">Làm lại</button>
            </div>
        </form><!--End form-->
    </div>
</body>
</html>